' Sample declarations for Vaunix LMS Frequency Synthesizer DLL
' VB6 style
' This file should be correct, but has not been tested with VB6. Consider it as just some examples, and test accordingly
' The DLL uses standard C float variables, which appear to have the same format as the VB6 Single data type. Test accordingly

' Useful constants -- status values that can be returned

Const STATUS_OK As Long = 0
Const BAD_PARAMETER As Long = &H80010000
Const BAD_HID_IO As Long = &H80020000
Const DEVICE_NOT_READY As Long = &H80030000

Const INVALID_DEVID As Long = &H80000000
Const DEV_CONNECTED As Long = &H00000001
Const DEV_OPENED As Long = &H00000002
Const SWP_ACTIVE As Long = &H00000004
Const SWP_UP As Long = &H00000008
Const SWP_REPEAT As Long = &H00000010


' void fnLMS_SetTestMode(bool testmode);
Declare Sub fnLMS_SetTestMode Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetTestMode@4" ( ByVal testmode As Long)

' int fnLMS_GetNumDevices();
Declare Function fnLMS_GetNumDevices Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetNumDevices@0" ( ) As Long

' int fnLMS_GetDevInfo(DEVID *ActiveDevices);
Declare Function fnLMS_GetDevInfo Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetDevInfo@4" ( ActiveDevicesFirstElement As Long) As Long
	
' int fnLMS_GetDeviceStatus(DEVID deviceID);	
Declare Function fnLMS_GetDeviceStatus Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetDeviceStatus@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetModelName(DEVID deviceID, char *ModelName);
Declare Function fnLMS_GetModelName Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetModelName@8" ( ByVal deviceID As Long, ByVal modelname As String) As Long

' int fnLMS_InitDevice(DEVID deviceID);
Declare Function fnLMS_InitDevice Lib "vnx_fmsynsth.dll" Alias "_fnLMS_InitDevice@4" ( ByVal deviceID As Long) As Long

' int fnLMS_CloseDevice(DEVID deviceID);
Declare Function fnLMS_CloseDevice Lib "vnx_fmsynsth.dll" Alias "_fnLMS_CloseDevice@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetSerialNumber(DEVID deviceID);
Declare Function fnLMS_GetSerialNumber Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetSerialNumber@4" ( ByVal deviceID As Long) As Long

' int fnLMS_SetFrequency(DEVID deviceID, int attenuation);
Declare Function fnLMS_SetFrequency Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetFrequency@8" ( ByVal deviceID As Long, ByVal frequency As Long) As Long

' int fnLMS_SetStartFrequency(DEVID deviceID, int startfrequency);
Declare Function fnLMS_SetStartFrequency Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetStartFrequency@8" ( ByVal deviceID As Long, ByVal startfrequency As Long) As Long

' int fnLMS_SetEndFrequency(DEVID deviceID, int endfrequency);
Declare Function fnLMS_SetEndFrequency Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetEndFrequency@8" ( ByVal deviceID As Long, ByVal endfrequency As Long) As Long
	
' int fnLMS_SetSweepTime(DEVID deviceID, int sweeptime);
Declare Function fnLMS_SetSweepTime Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetSweepTime@8" ( ByVal deviceID As Long, ByVal sweeptime As Long) As Long
	
' int fnLMS_SetPowerLevel(DEVID deviceID, int powerlevel);
Declare Function fnLMS_SetPowerLevel Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetPowerLevel@8" ( ByVal deviceID As Long, ByVal powerlevel As Long) As Long
	
' int fnLMS_SetRFOn(DEVID deviceID, bool on);
Declare Function fnLMS_SetRFOn Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetRFOn@8" ( ByVal deviceID As Long, ByVal rf_on As Long) As Long

' int fnLMS_SetPulseOnTime(DEVID deviceID, float pulseontime);
Declare Function fnLMS_SetPulseOnTime Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetPulseOnTime@8" ( ByVal deviceID As Long, ByVal pulseontime As Single) As Long

' int fnLMS_SetPulseOffTime(DEVID deviceID, float pulseofftime);
Declare Function fnLMS_SetPulseOffTime Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetPulseOffTime@8" ( ByVal deviceID As Long, ByVal pulseofftime As Single) As Long

' int fnLMS_EnableInternalPulseMod(DEVID deviceID, bool on);
Declare Function fnLMS_EnableInternalPulseMod Lib "vnx_fmsynsth.dll" Alias "_fnLMS_EnableInternalPulseMod@8" ( ByVal deviceID As Long, ByVal Pulse_on As Long) As Long

' int fnLMS_SetUseExternalPulseMod(DEVID deviceID, bool on);
Declare Function fnLMS_SetUseExternalPulseMod Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetUseExternalPulseMod@8" ( ByVal deviceID As Long, ByVal ExtPulseMod_on As Long) As Long

' int fnLMS_SetFastPulsedOutput(DEVID deviceID, float pulseontime, float pulsereptime, bool on);
Declare Function fnLMS_SetFastPulsedOutput Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetFastPulsedOutput@16" ( ByVal deviceID As Long, ByVal pulseontime As Single, ByVal pulsereptime As Single, ByVal Pulse_on As Long) As Long
	
' int fnLMS_SetSweepDirection(DEVID deviceID, bool up);
Declare Function fnLMS_SetSweepDirection Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetSweepDirection@8" ( ByVal deviceID As Long, ByVal sweep_up As Long) As Long

' int fnLMS_SetSweepMode(DEVID deviceID, bool mode);
Declare Function fnLMS_SetSweepMode Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetSweepMode@8" ( ByVal deviceID As Long, ByVal mode As Long) As Long

' int fnLMS_SetSweepType(DEVID deviceID, bool swptype);
Declare Function fnLMS_SetSweepType Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetSweepType@8" ( ByVal deviceID As Long, ByVal swptype As Long) As Long

' int fnLMS_StartSweep(DEVID deviceID, bool start_sweep);
Declare Function fnLMS_StartSweep Lib "vnx_fmsynsth.dll" Alias "_fnLMS_StartSweep@8" ( ByVal deviceID As Long, ByVal start_sweep As Long) As Long

' int fnLMS_SetUseInternalRef(DEVID deviceID, bool internal);
Declare Function fnLMS_SetUseInternalRef Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SetUseInternalRef@8" ( ByVal deviceID As Long, ByVal internal As Long) As Long

' int fnLMS_SaveSettings(DEVID deviceID);
Declare Function fnLMS_SaveSettings Lib "vnx_fmsynsth.dll" Alias "_fnLMS_SaveSettings@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetFrequency(DEVID deviceID);
Declare Function fnLMS_GetFrequency Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetFrequency@4" ( ByVal deviceID As Long) As Long
	
' int fnLMS_GetStartFrequency(DEVID deviceID);
Declare Function fnLMS_GetStartFrequency Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetStartFrequency@4" ( ByVal deviceID As Long) As Long
	
' int fnLMS_GetEndFrequency(DEVID deviceID);
Declare Function fnLMS_GetEndFrequency Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetEndFrequency@4" ( ByVal deviceID As Long) As Long
	
' int fnLMS_GetSweepTime(DEVID deviceID);
Declare Function fnLMS_GetSweepTime Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetSweepTimeTime@4" ( ByVal deviceID As Long) As Long
	
' int fnLMS_GetRF_On(DEVID deviceID);
Declare Function fnLMS_GetRF_On Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetRF_On@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetUseInternalRef(DEVID deviceID);
Declare Function fnLMS_GetUseInternalRef Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetUseInternalRef@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetMaxFreq(DEVID deviceID);
Declare Function fnLMS_GetMaxFreq Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetMaxFreq@4" ( ByVal deviceID As Long) As Long
	
' int fnLMS_GetMinFreq(DEVID deviceID);
Declare Function fnLMS_GetMinFreq Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetMinFreq@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetMinPwr(DEVID deviceID);
Declare Function fnLMS_GetMinPwr Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetMinPwr@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetMaxPwr(DEVID deviceID);
Declare Function fnLMS_GetMaxPwr Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetMaxPwr@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetPowerLevel(DEVID deviceID);
Declare Function fnLMS_GetPowerLevel Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetPowerLevel@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetDeviceStatus(DEVID deviceID);
Declare Function fnLMS_GetDeviceStatus Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetDeviceStatus@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetUseInternalPulseMod(DEVID deviceID);
Declare Function fnLMS_GetUseInternalPulseMod Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetUseInternalPulseMod@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetHasFastPulseMode(DEVID deviceID);
Declare Function fnLMS_GetHasFastPulseMode Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetHasFastPulseMode@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetPulseMode(DEVID deviceID);
Declare Function fnLMS_GetPulseMode Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetPulseMode@4" ( ByVal deviceID As Long) As Long

' int fnLMS_GetPulseOffTime(DEVID deviceID);
Declare Function fnLMS_GetPulseOffTime Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetPulseOffTime@4" ( ByVal deviceID As Long) As Single

' int fnLMS_GetPulseOnTime(DEVID deviceID);
Declare Function fnLMS_GetPulseOnTime Lib "vnx_fmsynsth.dll" Alias "_fnLMS_GetPulseOnTime@4" ( ByVal deviceID As Long) As Single